import request from "@/utils/request";

// 查询优惠券管理列表
export function listActivity(query) {
  return request({
    url: "/activity/activity/list",
    method: "get",
    params: query,
  });
}

// 查询优惠券管理详细
export function getActivity(id) {
  return request({
    url: "/activity/activity/" + id,
    method: "get",
  });
}

// 新增优惠券管理
export function addActivity(data) {
  return request({
    url: "/activity/activity",
    method: "post",
    data: data,
  });
}

// 修改优惠券管理
export function updateActivity(data) {
  return request({
    url: "/activity/activity",
    method: "put",
    data: data,
  });
}

// 删除优惠券管理
export function delActivity(id) {
  return request({
    url: "/activity/activity/" + id,
    method: "delete",
  });
}
